package org.pzy.java.jvm;

/**
 * @author pzy
 *
 * javap -v -p .\ByteCodeDemo.class
 *
 * Classfile /D:/gitee/framework-base/java/src/main/java/org/pzy/java/jvm/ByteCodeDemo.class
 *   Last modified 2023-11-23; size 298 bytes
 *   MD5 checksum 9d35ca94081fc3ea71596e803253fbc4
 *   Compiled from "ByteCodeDemo.java"
 * public class org.pzy.java.jvm.ByteCodeDemo
 *   minor version: 0
 *   major version: 52
 *   flags: ACC_PUBLIC, ACC_SUPER
 * Constant pool:
 *    #1 = Methodref          #4.#15         // java/lang/Object."<init>":()V
 *    #2 = Fieldref           #3.#16         // org/pzy/java/jvm/ByteCodeDemo.m:I
 *    #3 = Class              #17            // org/pzy/java/jvm/ByteCodeDemo
 *    #4 = Class              #18            // java/lang/Object
 *    #5 = Utf8               m
 *    #6 = Utf8               I
 *    #7 = Utf8               <init>
 *    #8 = Utf8               ()V
 *    #9 = Utf8               Code
 *   #10 = Utf8               LineNumberTable
 *   #11 = Utf8               inc
 *   #12 = Utf8               ()I
 *   #13 = Utf8               SourceFile
 *   #14 = Utf8               ByteCodeDemo.java
 *   #15 = NameAndType        #7:#8          // "<init>":()V
 *   #16 = NameAndType        #5:#6          // m:I
 *   #17 = Utf8               org/pzy/java/jvm/ByteCodeDemo
 *   #18 = Utf8               java/lang/Object
 * {
 *   private int m;
 *     descriptor: I
 *     flags: ACC_PRIVATE
 *
 *   public org.pzy.java.jvm.ByteCodeDemo();
 *     descriptor: ()V
 *     flags: ACC_PUBLIC
 *     Code:
 *       stack=1, locals=1, args_size=1
 *          0: aload_0
 *          1: invokespecial #1                  // Method java/lang/Object."<init>":()V
 *          4: return
 *       LineNumberTable:
 *         line 6: 0
 *       stack=2, locals=1, args_size=1
 *          0: aload_0
 *          1: getfield      #2                  // Field m:I
 *          4: iconst_1
 *          5: iadd
 *          6: ireturn
 *       LineNumberTable:
 *         line 11: 0
 * }
 * SourceFile: "ByteCodeDemo.java"
 */
public class ByteCodeDemo {

    private int m;

    public int inc() {
        return m + 1;
    }
}
